package com.hnichr.ump.schedule.job.assessment;

import com.hnichr.ump.common.assessment.service.AssessmentService;
import com.hnichr.ump.common.schedule.dto.RunResultDTO;
import com.hnichr.ump.common.schedule.entity.ScheduleDesk;
import com.hnichr.ump.schedule.job.AbstractJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class SyncTesteeUnSyncResultJob extends AbstractJob {
    @Autowired
    private AssessmentService assessmentService;

    @Override
    public String getScheduleName() {
        return "SyncTesteeUnSyncResult";
    }

    @Override
    public boolean doRunCheck(ScheduleDesk scheduleDesk) {
        return true;
    }

    @Override
    public RunResultDTO doRun(ScheduleDesk scheduleDesk) {
        return assessmentService.syncTesteeUnSyncResult();
    }

    @Override
    public Date getNextScheduleTime(ScheduleDesk scheduleDesk) {
        return null;
    }
}
